home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dskut
/
billutil.zip
/
TFORM.ZIP
/
TFORM.TXT
< prev
next >
Wrap
Text File
|
1993-11-13
|
1KB
|
33 lines
TFORM.EXE
Tform is a simple numerical ASCII search and replace program.
You pass TForm a filename to format, the ASCII code of the char to
replace, and any number of characters to replace it with. Usage is
as follows: tform filename fromnumber tonumber(s). Some examples:
tform test.txt 13 -1
(This will delete all carriage returns in the file test.txt.)
tform foobar.txt 09 32 32 32 32
(This will change all tabs in foobar.txt to four spaces.)
Tform is primarily intended to be used from a batch file. Output
is in file 1$2$3$4$.5$6 which can then be copied over the input file
and deleted. Included example batch files are UNIX2DOS.BAT and
DOS2UNIX.BAT. The first changes UNIX newlines (linefeeds only) to DOS
newlines (carriage return + linefeed). The second changes DOS newlines
to UNIX newlines.
---Handy ASCII values:---
Tab=09
Linefeed=10
Formfeed=12
CarriageReturn=13
Space=32
'0'=48, ... '9'=57
'A'=65, ... 'Z'=90
'a'=97, ... 'z'=122
SPECIAL VALUE FOR DELETION: -1
(Use the -1 'character' to delete a character, as in the example above.)